package com.practices.service;

import java.util.List;

import org.apache.http.HttpClientConnection;
import org.apache.http.client.HttpClient;

import com.practices.bean.DownloadInfo;


import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

public class DownloadService extends Service {
	private String urlstr;// 下载的地址
	private String localfile;// 保存路径
	private int threadcount;// 线程数
	
	private int fileSize;// 所要下载的文件的大小
	private List<DownloadInfo> infos;// 存放下载信息类的集合
	
	private static final int INIT = 1;// 定义三种下载的状态：初始化状态，正在下载状态，暂停状态，下载完成
	private static final int DOWNLOADING = 2;
	private static final int PAUSE = 3;
	private static final int FINISH = 4;
	private int state = INIT;
	
	@Override
	public IBinder onBind(Intent arg0) {
		return null;
	}

	@Override
	public void onCreate() {
		super.onCreate();
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
	}

	@Override
	@Deprecated
	public void onStart(Intent intent, int startId) {
		// TODO Auto-generated method stub
		super.onStart(intent, startId);
	}

	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
		return super.onStartCommand(intent, flags, startId);
		
	}
	

}
